package com.shtel.paas.monitorcenter.autodiscover.service;

import java.util.List;
import java.util.Map;

import com.alibaba.fastjson.JSONObject;
import com.shtel.paas.monitorcenter.autodiscover.entity.AlarmFrequency;
import com.shtel.paas.monitorcenter.autodiscover.entity.AlarmKpi;
import com.shtel.paas.monitorcenter.autodiscover.entity.AlarmResponse;
import com.shtel.paas.monitorcenter.autodiscover.entity.AlarmRule;
import com.shtel.paas.monitorcenter.autodiscover.entity.AlarmRulesHost;
import com.shtel.paas.monitorcenter.autodiscover.entity.AlarmWhite;
import com.shtel.paas.monitorcenter.autodiscover.entity.MonitorCenterHostInfomation;
import com.shtel.paas.monitorcenter.autodiscover.entity.RuleId;

public interface AutoDiscoverService {

	// 保存alarm_rules_host，cpu等告警值个性化配置
	public boolean saveAlarmRulesHost(AlarmRulesHost alarmRulesHost);

	// 添加白名单信息
	public boolean saveAlarmWhite(AlarmWhite alarmWhite);

	// 添加联系人信息
	public boolean saveAlarmResponse(AlarmResponse alarmResponse);

	// 保存频率或者预警次数类似信息
	public boolean saveAlarmFrequency(AlarmFrequency alarmFrequency);

	// 保存运维命令
	public boolean saveAlarmKpi(AlarmKpi alarmKpi);

	// 更新运维命令
	public int updateAlarmKpi(AlarmKpi alarmKpi);

	// 保存host配置信息,即保存主机表
	public boolean saveMonitorCenterHostInfomation(MonitorCenterHostInfomation monitorCenterHostInfomation);

	// 保存信息
	public String saveInfo(String object);

	// 查询指标规则
	// public List<AlarmRule> queryIndexRule(int num);

	public List<AlarmRule> queryIndexRule();

	// 查询频率信息
	public List<AlarmFrequency> queryFrequency();

	// 查询运维命令
	// public List<AlarmKpi> queryKpi(int num);

	public List<AlarmKpi> queryKpi();

	// 获取监控ip
	public JSONObject queryIps();

	// 查询主机信息表里已保存的ip
	public List<String> queryALLIps();

	// 根据ip查询hostId
	public int queryHostId(String ip);

	// 查询用户对应的id
	public int queryUserId(String ip);

	// 查询默认的规则的id
	public int queryRuleId(RuleId ruleId);

	// 查询kpi_name
	public boolean queryKpiname(String name);

}
